package com.online.onlinestudent.entity;

import cn.hutool.core.bean.copier.ValueProvider;
import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;


@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("students")
public class Student extends User{
    @TableId(value = "id", type =  IdType.AUTO)
    private Long id;
    private String username;
    private String password;
    private String email;
    private Integer age;
    private String gender;//M,F,O
    private String phone;
    private String address;

    // 创建时间，插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    // 更新时间，插入和更新时自动填充
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    private Integer isWho;// 0为学生，1为老师

}
